<?php

$FormFocus = 'onLoad = "document.NumberPad.Number.focus()"';

$InstructionTitle = "Instructions";
$InstructionDetails = "Either scan the barcode on the prescription bottle or enter the NDC code using the keypad.";

$LargeButton1Text = "Enter barcode or NDC code &#160;&#160; ";
// Not sure ... maybe this goes to the select prescription page
// Need to have some kind of if statement so it doesn't show up in the wizard
$NonPrescription = $_GET['NonPrescription'];
if ($NonPrescription){
  $SubmitPage = "barcode-confirmation.php?NonPrescription=1";
} else {
  $SubmitPage = "barcode-confirmation.php?NonPrescription=0";
}

$LargeButton2Text = "Choose from pharmacy list  &#160;&#160; ";

// MAY WANT TO CHANGE THIS...have to pass breadcrumb trail info with prev. page
$BreadCrumb = FALSE;

$ButtonText = "||| &#160;&#160;Back";

// passed previous page with variable in URL
$NextPage = $_GET['NextPage'];
$NonPrescription = $_GET['NonPrescription'];
if ($NonPrescription){
$NextPage = $NextPage."?NextPage=missing-nonprescriptions-add.php&Wizard=1&NonPrescription=1";
} else { //we're in prescription
$NextPage = $NextPage."?NextPage=missing-prescriptions-add.php&Wizard=1&NonPrescription=0";
}

include './includes/wizard-simple-header.php';

?>

<script type="text/javascript">
function Append(TheValue)
{
	document.getElementById("Number").value += TheValue;
}
function Erase()
{
	var Length = document.getElementById("Number").value.length;
	document.all.Number.value = document.getElementById("Number").value.substring(0,Length-1);
}
function ClearNumber()
{
	document.getElementById("Number").value = "";
}
</script>

<div class="invisible-border">
<form name=NumberPad action="<?php echo $SubmitPage ?>" method="post">
<table>
<tr>
<td>
<input type="text" id="Number" name="Number" style="width:100px; text-align:right"/>
</td>
<td>
<input class="floatright" type="submit" value="Submit  |||">
</td>
<td>
<p>
<input type="button" value="7" onclick="Append(this.value)"/>
<input type="button" value="8" onclick="Append(this.value)"/>
<input type="button" value="9" onclick="Append(this.value)"/>
</p>
<p>
<input type="button" value="4" onclick="Append(this.value)"/>
<input type="button" value="5" onclick="Append(this.value)"/>
<input type="button" value="6" onclick="Append(this.value)"/>
</p>
<p>
<input type="button" value="1" onclick="Append(this.value)"/>
<input type="button" value="2" onclick="Append(this.value)"/>
<input type="button" value="3" onclick="Append(this.value)"/>
</p>
<p>
<input type="button" value="<<" onclick="EraseCharacter()"/>
<input type="button" value="0" onclick="Append(this.value)"/>
<input type="button" value="C" onclick="ClearNumber()"/>
</p>
</td>
</tr>
</table>

</form>
</div>

<?php
include './includes/wizard-next-button.php';
include './includes/wizard-simple-footer.php';

?>